package com.yuhanginfo.modules.web.entity;

import org.hibernate.validator.constraints.Length;

import com.yuhanginfo.common.persistence.WebDataEntity;

/**
 * 轮播图Entity
 * @author lvls
 * @version 2017-10-09
 */
public class WebCarousel extends WebDataEntity<WebCarousel> {
	
	private static final long serialVersionUID = 1L;
	private String url;		// 链接
	private String img;		// 图片
	private Integer sort;		// 排序
	
	public WebCarousel() {
		super();
	}

	public WebCarousel(String id){
		super(id);
	}

	@Length(min=0, max=255, message="链接长度必须介于 0 和 255 之间")
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	@Length(min=0, max=255, message="图片长度必须介于 0 和 255 之间")
	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	
	@Length(min=0, max=11, message="排序长度必须介于 0 和 11 之间")
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
}